package com.woniuxy.lifeorder.api.feign;

import com.woniuxy.life.core.api.CommonResult;
import com.woniuxy.life.core.api.OrderCode;
import com.woniuxy.lifeorder.api.dto.BusOrder;
import com.woniuxy.lifeorder.api.feign.factory.OrderServiceFallbackFactory;
import com.woniuxy.lifeorder.api.vo.OrderInsertVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(
        contextId = "orderService",
        value = OrderCode.ORDER_SERVICE,
        fallbackFactory = OrderServiceFallbackFactory.class
)
public interface OrderService {
    @GetMapping("/bus-order/list")
    public CommonResult pageOrder(@RequestParam(value = "page",defaultValue = "1") Integer current, @RequestParam(value = "size",defaultValue = "1") Integer size, BusOrder busOrder);
    @PutMapping("/bus-order/update")
    public CommonResult updateOrder(BusOrder busOrder);
    @PostMapping("/bus-order/order")
    public CommonResult insertOrder(@RequestBody OrderInsertVO insertVO);
    @DeleteMapping("/bus-order/order")
    public CommonResult deleteOrder(Integer orderId);
}
